home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / djapi / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-06  |  5.4 KB  |  195 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Test DJApi Control"
  4.    ClientHeight    =   3135
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5355
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3135
  10.    ScaleWidth      =   5355
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin prjDJApi.DJApi DJApi1 
  13.       Left            =   2220
  14.       Top             =   465
  15.       _ExtentX        =   1349
  16.       _ExtentY        =   582
  17.    End
  18.    Begin VB.CommandButton Command1 
  19.       Caption         =   "Command1"
  20.       Height          =   495
  21.       Left            =   2415
  22.       TabIndex        =   12
  23.       Top             =   2355
  24.       Width           =   1215
  25.    End
  26.    Begin VB.CommandButton cmdScroll 
  27.       Caption         =   "Toggle Scroll"
  28.       Height          =   495
  29.       Left            =   4110
  30.       TabIndex        =   11
  31.       Top             =   2535
  32.       Width           =   1215
  33.    End
  34.    Begin VB.CommandButton cmdNum 
  35.       Caption         =   "Toggle Num"
  36.       Height          =   495
  37.       Left            =   4110
  38.       TabIndex        =   10
  39.       Top             =   1950
  40.       Width           =   1215
  41.    End
  42.    Begin VB.CommandButton cmdCaps 
  43.       Caption         =   "Toggle Caps"
  44.       Height          =   495
  45.       Left            =   4110
  46.       TabIndex        =   9
  47.       Top             =   1350
  48.       Width           =   1215
  49.    End
  50.    Begin VB.CommandButton cmdTaskBar 
  51.       Caption         =   "Hide TaskBar"
  52.       Height          =   495
  53.       Left            =   4110
  54.       TabIndex        =   8
  55.       Top             =   750
  56.       Width           =   1215
  57.    End
  58.    Begin VB.CommandButton cmdNoClose 
  59.       Caption         =   "Disable Form Close"
  60.       Height          =   495
  61.       Left            =   4110
  62.       TabIndex        =   7
  63.       Top             =   105
  64.       Width           =   1215
  65.    End
  66.    Begin VB.CommandButton cmdGetWin 
  67.       Caption         =   "GetWinRect"
  68.       Height          =   495
  69.       Left            =   0
  70.       TabIndex        =   6
  71.       Top             =   1950
  72.       Width           =   1215
  73.    End
  74.    Begin VB.CheckBox chkTrue 
  75.       Caption         =   "True"
  76.       Height          =   225
  77.       Left            =   1350
  78.       TabIndex        =   5
  79.       Top             =   2700
  80.       Value           =   1  'Checked
  81.       Width           =   735
  82.    End
  83.    Begin VB.CommandButton cmdWinPos 
  84.       Caption         =   "Set Win Pos"
  85.       Height          =   495
  86.       Left            =   0
  87.       TabIndex        =   4
  88.       Top             =   1350
  89.       Width           =   1215
  90.    End
  91.    Begin VB.CommandButton cmdSetParent 
  92.       Caption         =   "Set Parent"
  93.       Height          =   495
  94.       Left            =   0
  95.       TabIndex        =   3
  96.       Top             =   105
  97.       Width           =   1215
  98.    End
  99.    Begin VB.PictureBox picContain 
  100.       Height          =   810
  101.       Left            =   2040
  102.       ScaleHeight     =   750
  103.       ScaleWidth      =   1230
  104.       TabIndex        =   2
  105.       Top             =   1215
  106.       Width           =   1290
  107.    End
  108.    Begin VB.CommandButton cmdName 
  109.       Caption         =   "GetCmpName"
  110.       Height          =   495
  111.       Left            =   0
  112.       TabIndex        =   1
  113.       Top             =   750
  114.       Width           =   1215
  115.    End
  116.    Begin VB.CommandButton cmdKeys 
  117.       Caption         =   "Disable Keys"
  118.       Height          =   495
  119.       Left            =   0
  120.       TabIndex        =   0
  121.       Top             =   2535
  122.       Width           =   1215
  123.    End
  124. Attribute VB_Name = "Form1"
  125. Attribute VB_GlobalNameSpace = False
  126. Attribute VB_Creatable = False
  127. Attribute VB_PredeclaredId = True
  128. Attribute VB_Exposed = False
  129. Private Sub cmdNum_Click()
  130.   Call DJApi1.LockToggle(VK_NUMLOCK)
  131. End Sub
  132. Private Sub cmdCaps_Click()
  133.   Call DJApi1.LockToggle(VK_CAPITAL)
  134. End Sub
  135. Private Sub cmdScroll_Click()
  136.   Call DJApi1.LockToggle(VK_SCROLL)
  137. End Sub
  138. Private Sub cmdGetWin_Click()
  139.   Dim Left As Long
  140.   Dim Top As Long
  141.   Call DJApi1.GetWindowRect(picContain.hWnd, Left, Top)
  142.   Debug.Print Left, Top
  143. End Sub
  144. Private Sub cmdKeys_Click()
  145.   Dim blnDisable As Boolean
  146.   If chkTrue.Value = Checked Then
  147.     blnDisable = True
  148.   Else
  149.     blnDisable = False
  150.   End If
  151.   Call DJApi1.DisableSystemKeys(blnDisable)
  152. End Sub
  153. Private Sub cmdName_Click()
  154.   MsgBox DJApi1.GetComputerName
  155. End Sub
  156. Private Sub cmdNoClose_Click()
  157.   DJApi1.DisableClose (Me.hWnd)
  158. End Sub
  159. Private Sub cmdSetParent_Click()
  160.   Dim lnghWnd As Long
  161.   With DJApi1
  162.     lnghWnd = cmdSetParent.hWnd
  163.     If .GetParent(lnghWnd) = Me.hWnd Then
  164.       Call .SetParent(lnghWnd, picContain.hWnd)
  165.     Else
  166.       Call .SetParent(lnghWnd, Me.hWnd)
  167.     End If
  168.   End With
  169. End Sub
  170. Private Sub cmdTaskBar_Click()
  171.   Call DJApi1.ShowTaskBar
  172.   With cmdTaskBar
  173.     If Left(.Caption, 1) = "H" Then
  174.       .Caption = "Show TaskBar"
  175.     Else
  176.       .Caption = "Hide TaskBar"
  177.     End If
  178.   End With
  179. End Sub
  180. Private Sub cmdWinPos_Click()
  181.   Dim Left As Long
  182.   Dim Top As Long
  183.   If picContain.Left = 0 Then
  184.     Left = 2200
  185.     Top = 1000
  186.   Else
  187.     Left = 0
  188.     Top = 0
  189.   End If
  190.   Call DJApi1.SetWindowPos(picContain.hWnd, HWND_TOP, Left, Top)
  191. End Sub
  192. Private Sub Command1_Click()
  193.   MsgBox DJApi1.GetNextWindow(Me.hWnd, GW_OWNER)
  194. End Sub
  195.